package com.kunlun.basedata.organize.model;

import com.kunlun.basedata.organize.model.enums.UnitTypeEnum;
import com.kunlun.common.model.TreeModel;

/**
 * 单位管理模型
 */
public class CompanyModel extends TreeModel<CompanyModel> {

    /**
     * 单位名称
     */
    private String name;

    /**
     * 单位类型（0：租户；1-集团；2-分公司；3-办事处；4-门店）
     */
    private Integer type;

    /**
     * 公司地址
     */
    private String address;

    /**
     * 业务描述
     */
    private String describe;

    public CompanyModel() {}

    public CompanyModel(DepartmentModel departmentModel) {
        this.setId(departmentModel.getId());
        this.setName(departmentModel.getName());
        this.setType(UnitTypeEnum.DEPARTMENT.getKey());
    }

    public CompanyModel(PostModel postModel) {
        this.setId(postModel.getId());
        this.setName(postModel.getName());
        this.setType(UnitTypeEnum.POST.getKey());
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
